package com.uniledger.exchange;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;

import com.uniledger.exchange.base.activity.BaseActivity;
import com.uniledger.exchange.event.GuideEvent;
import com.uniledger.exchange.event.MessageEvent;
import com.uniledger.exchange.login.FragmentPagerGuideAdapter;
import com.uniledger.exchange.wallet.RestoreActivity;
import com.uniledger.exchange.login.SignUpActivity;
import com.uniledger.exchange.login.fragment.GuideFragment;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import me.relex.circleindicator.CircleIndicator;

/**
 * 引导页面
 */
public class GuideActivity extends BaseActivity {

    public static void start(Activity activity) {
        Intent intent = new Intent(activity, GuideActivity.class);
        activity.startActivity(intent);
    }

    @BindView(R.id.btn_restore)
    Button restore;

    @BindView(R.id.btn_login)
    Button login;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        EventBus.getDefault().register(this);
    }

    @OnClick(R.id.btn_restore)
    void restoreClick() {
        RestoreActivity.start(this);
    }

    @OnClick(R.id.btn_login)
    void loginClick() {
        SignUpActivity.start(this);
    }

    @Override
    public void getParams() {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onGuideEvent(GuideEvent event) {
        finish();
    }
}
